package ooday04;

/**
 * @author Huangjin
 * @version 1.0
 * describe:主人
 * @date 2023/2/24 10:28
 */
public class Master {
    /** 多态*/
    void feed(Animal animal){
        animal.eat();
        animal.drink();
    }
    /**复用性差，扩展性差，维护性差*/
    void feed(Dog dog){
        dog.eat();
    }
    void feed(Fish fish){
        fish.eat();
    }
    void feed(Chick chick){
        chick.eat();
    }
}
